import { Selector } from '@ngxs/store';
import { PageState, PageStateModel } from '.';

export class PageSelector {

  @Selector([PageState])
  static page(page: PageStateModel) {
    return page;
  }

  @Selector([PageState])
  static pageNo({pageNo}: PageStateModel) {
    return pageNo;
  }

  @Selector([PageState])
  static pageSize({pageSize}: PageStateModel) {
    return pageSize;
  }

  @Selector([PageState])
  static param({param}: PageStateModel) {
    return param;
  }

  @Selector([PageState])
  static count({count}: PageStateModel) {
    return count;
  }

  @Selector([PageState])
  static order({order}: PageStateModel) {
    return order;
  }

  @Selector([PageState])
  static orderBy({orderBy}: PageStateModel) {
    return orderBy;
  }

}
